CMAKE_MINIMUM_REQUIRED(VERSION 3.6.0)

PROJECT(utils)

SET(TARGET utils)

SET(
  ${TARGET}_SOURCE_FILES
  ${CMAKE_CURRENT_SOURCE_DIR}/file.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/fs.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/proc_fs.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/threads.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/timers.cpp
  ${CMAKE_CURRENT_SOURCE_DIR}/npth_dl.c
  ${CMAKE_CURRENT_SOURCE_DIR}/xcc_fmt.c
)

ADD_LIBRARY(
  ${TARGET}
  STATIC
  ${${TARGET}_SOURCE_FILES}
)

TARGET_INCLUDE_DIRECTORIES(
  ${TARGET}
  PUBLIC include
)

FIND_LIBRARY(log-lib log)

TARGET_LINK_LIBRARIES(
  ${TARGET}
  PUBLIC ${log-lib}
)
